package gui;


import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import service.UpDownService;

public class Application {

    /**
     * @param args
     */
    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } 
        catch (UnsupportedLookAndFeelException e) {
           // handle exception
        }
        catch (ClassNotFoundException e) {
           // handle exception
        }
        catch (InstantiationException e) {
           // handle exception
        }
        catch (IllegalAccessException e) {
           // handle exception
        }

        
        SplashScreen sp = new SplashScreen();
        sp.setLocationRelativeTo(null);
        sp.setVisible(true);
        UpDownService.getInstance().startUp();
        sp.setVisible(false);
        
/*        LookAndFeelInfo[] li = UIManager.getInstalledLookAndFeels();
        for (int i = 0; i < li.length; i++) {
            System.out.println( li[i].getClassName() );
        } */
        
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (Exception e) {
            
        }
        
        
/*        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
*/                    MainFrame2 frame = new MainFrame2();
                       frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
                    frame.setVisible(true);
/*                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
*/        UpDownService.getInstance().shutDown();
    }

}
